////////////////////////////////////////////////////////////////////////////
//
//  Crytek Engine Source File.
//  Copyright (C), Crytek Studios, 2002-2006.
// -------------------------------------------------------------------------
//  File name:   SelectSequenceDialog.cpp
//  Version:     v1.00
//  Created:     14/03/2006 by AlexL.
//  Compilers:   Visual Studio.NET
//  Description: 
// -------------------------------------------------------------------------
//  History:
//
////////////////////////////////////////////////////////////////////////////

#include "StdAfx.h"
#include "SelectSequenceDialog.h"
#include <IMovieSystem.h>

// CSelectSequence dialog

IMPLEMENT_DYNAMIC(CSelectSequenceDialog, CGenericSelectItemDialog)

//////////////////////////////////////////////////////////////////////////
CSelectSequenceDialog::CSelectSequenceDialog(CWnd* pParent) :	CGenericSelectItemDialog(pParent)
{
	m_dialogID = "Dialogs\\SelSequence";
}

//////////////////////////////////////////////////////////////////////////
/* virtual */ BOOL
CSelectSequenceDialog::OnInitDialog()
{
	SetTitle(_T("Select Sequence"));
	SetMode(eMODE_LIST);
	return __super::OnInitDialog();
}

//////////////////////////////////////////////////////////////////////////
/* virtual */ void
CSelectSequenceDialog::GetItems(std::vector<SItem>& outItems)
{
	IMovieSystem *pMovieSys = GetIEditor()->GetMovieSystem();
	for (int i=0; i<pMovieSys->GetNumSequences(); ++i)
	{
		IAnimSequence* pSeq = pMovieSys->GetSequence(i);
		SItem item;
		string fullname = pSeq->GetFullName();
		item.name = fullname.c_str();
		outItems.push_back(item);
	}
}
